//
//  ViewController.m
//  CountDownButton
//
//  Created by Lee on 2017/4/7.
//  Copyright © 2017年 cashpie. All rights reserved.
//

#import "ViewController.h"
#import "UIButton+CountDown.h"
#import <IQKeyboardManager/IQKeyboardManager.h>
#import "HWWebViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    UIButton * button = [UIButton buttonWithType:0];
    [button addTarget:self action:@selector(countDown:) forControlEvents:UIControlEventTouchUpInside];
    [button setTitle:@"发送验证码" forState:UIControlStateNormal];
    [button setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
    button.frame = CGRectMake(100, 100, 100, 50);
    [self.view addSubview:button];
    
    
    UITextField * textField = [[UITextField alloc]initWithFrame:CGRectMake(50, 250, 200, 40)];
    textField.placeholder = @"please input information";
    [self.view addSubview:textField];
    
    NSLog(@"%@",[IQKeyboardManager sharedManager].enabledToolbarClasses);
    
    
    // Do any additional setup after loading the view, typically from a nib.
}

- (void)countDown:(UIButton *)sender{
    
    HWWebViewController * webViewControlller = [[HWWebViewController alloc]init];
    
    UINavigationController * navigationController = [[UINavigationController alloc]initWithRootViewController:webViewControlller];
    
    [self presentViewController:navigationController animated:YES completion:nil];

//    [sender countDownSeconds:60 endTitle:@"重新发送" waitTitle:@"s"];

}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
